<template>
	<view class="page flex-col">
		<view class="group_6 flex-col">
			<view class="text-wrapper_1 flex-row justify-between">
				<text class="text_7">银行卡号</text>
				<input type="text" v-model="params.account_number" placeholder="请输入" class="text_8">
			</view>
			<view class="text-wrapper_1 flex-row justify-between">
				<text class="text_7">银行名称</text>
				<input v-model="params.agency_name" type="text" placeholder="请输入" class="text_8">
			</view>
			<view class="text-wrapper_1 flex-row justify-between">
				<text class="text_7">持卡人</text>
				<input v-model="params.account_name" type="text" placeholder="请输入" class="text_8">
			</view>
			<view class="text-wrapper_1 flex-row justify-between">
				<text class="text_7">预留手机号</text>
				<input v-model="params.phone" type="text" placeholder="请输入" class="text_8">
			</view>
		</view>
		<button class="button_1 flex-col align-center justify-center" @click="confirm()">
			<text class="text_20">保存</text>
		</button>
	<!-- 	<u-popup :show="show1" mode="center" :round="10" closeable @close="show1=false">
			<view class="popup" style="padding: 40rpx;">
				<view class="popup-title">请输入验证码</view>
				<view class="popup-code">
					<u-code-input v-model="pay_pass" :focus="true" :space="0" dot @finish="finish" borderColor="#E6E6E6"
						color="#333333">
					</u-code-input>
				</view>
			</view>
		</u-popup> -->
	</view>
</template>
<script>
	export default {
		data() {
			return {
				params: {
					shop_id:'',
					account_number:'',	//卡号
					agency_name:'',//	银行名称
					account_name:'',//	持卡人
					phone:'',//	手机号
					// cvv:'',//将冒号后面内容提示给用户："CVV码，贷记卡必填"
					// validtimeend:'',//将冒号后面内容提示给用户："贷记卡必填，格式如下：2023年8月填入082023"
				},
				show1:false,
				pay_pass:'',
				signid:''
			};
		},
		computed: {},
		onShow() {
			if(uni.getStorageSync('shop_id')){
				this.params.shop_id=uni.getStorageSync('shop_id')
			}else{
				// this.$isLogin(uni.getStorageSync('shop_id'))
			}
		},
		methods: {
			confirm(){		
				this.$req.requestPOST(this.$api.CenterInfo.bindWithdrawAccount,this.params).then((res)=>{
					console.log(res);
					uni.showToast({
						title: res.message,
						icon: 'none'
					})
					if(res.flag=="success"){
						// this.signid=res.data.data.signid
						setTimeout(()=>{
							// this.show1=true
							uni.navigateBack()
						},1000)
					}else{
					
					}
				})
			},
			finish(){
				this.show1=false
				this.$req.requestPOST(this.$api.CenterInfo.signConfirm,{
					shop_id:this.params.shop_id,
					verify:this.pay_pass,
					signid:this.signid
				}).then((res)=>{
					console.log(res);
					uni.showToast({
						title: res.message,
						icon: 'none'
					})
					this.pay_pass=''
					if(res.flag==="success"){
						setTimeout(()=>{
							uni.navigateBack()
						},1500)
					}
				})
			}
		}
	};
</script>
<style lang='css'>
	/* @import '../common/common.css'; */
		.page {
		  background-color: rgba(255, 255, 255, 1);
		  position: relative;
		  width: 750rpx;
		  /* height: 1624rpx; */
		  /* overflow: hidden; */
		}
	.text-wrapper_1 {
	  width: 92%;
	  margin: 0 4%;
	  height: 110rpx;
	  display: flex;
	  align-items: center;
	  /* justify-content: flex-start; */
	  border-bottom: 2rpx solid rgba(246, 246, 246, 1);
	  /* margin: 40rpx 0 0 31rpx; */
	}
	.wrapper_1{
		border-bottom:0;
	}
	.text_7 {
	  width: 108rpx;
	  height: 27rpx;
	  color: rgba(51, 51, 51, 1);
	  font-size: 28rpx;
	  font-family: PingFangHeiTC-W4;
	  text-align: left;
	  white-space: nowrap;
	  line-height: 28rpx;
	  margin-right: 132rpx;
	}
	
	.tim>text:nth-child(2){
		margin:0 10rpx;
	}
	.tim{
		font-size: 28rpx;
	}
	.text_8 {
	  height: 26rpx;
	  color: #333;
	  font-size: 28rpx;
	  text-align: right;
	  white-space: nowrap;
	  line-height: 28rpx;
	}
	.button_1{
		width: 590rpx;
		height: 104rpx;
		position: fixed; 
		bottom: 50rpx;
		left: 80rpx;
		background: linear-gradient(0deg, #FD5463, #FF3C2E);
		border-radius: 30rpx;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
	}
	.popup {
		width: 70vw;
		display: flex;
		align-items: center;
		flex-direction: column;
	}
	.popup-code {
		margin: 50rpx auto;
	}
</style>
